From: Joey Hess Date: Thu, 6 Mar 2025 18:42:07 +0000 (-0400) Subject: prefix output with ./ in example X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~6^2~117 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=825a648670da28c2ae120fdc84fdbf74ba66cae0;p=git-annex.git prefix output with ./ in example --- diff --git a/doc/design/compute_special_remote_interface.mdwn b/doc/design/compute_special_remote_interface.mdwn index 869883f918..2c97946a81 100644 --- a/doc/design/compute_special_remote_interface.mdwn +++ b/doc/design/compute_special_remote_interface.mdwn @@ -100,8 +100,11 @@ An example `git-annex-compute-foo` shell script follows: echo "INPUT $2" read input echo "OUTPUT $3" + # Prefixing with ./ makes sure that the output is treated as a + # filename, rather than a dashed option. + output="./$3" echo REPRODUCIBLE if [ -n "$input" ]; then - mkdir -p "$(dirname "$3")" - frobnicate --passes="$ANNEX_COMPUTE_passes" <"$input" >"$3" + mkdir -p "$(dirname "$output")" + frobnicate --passes="$ANNEX_COMPUTE_passes" <"$input" >"$output" fi